package thin4ca

class Relation(val reference: EntityDef, val cardinality: Cardinality.Value) {

  override def toString = "->" + reference.name + "(" + 
    (cardinality match {
      case Cardinality.One => "1"
      case Cardinality.Many => "N"
      case Cardinality.Undefined => "?"
    }) + ")"
}

object Cardinality extends Enumeration {
  val One, Many, Undefined = Value 
}
